	<!-- 
		二级导航：一般用作 CMS 、企业站、商城、等多频道需求的站点
		Xiuno BBS 4.0 的 PC/Mobile 分离写法 
		优点：结构清晰
		缺点：有重复代码
	-->
	
	<!--{hook header_nav_2_start.htm}-->
	<header id="header">
	
		<!-- PC Navigation start -->
		<div class="navbar navbar-dark bg-dark navbar-expand-lg hidden-sm hidden-md">
			<div class="container" id="pc_nav">
			
				<!-- PC: logo -->
				<!--{hook header_nav_2_pc_logo_before.htm}-->
				<a class="navbar-brand text-truncate" href="<?php echo $header['mobile_link'];?>">
					<img src="<?php echo $conf['logo_pc_url'];?>" class="logo-2">
				</a>
				<!--{hook header_nav_2_pc_logo_after.htm}-->
				
				<!-- PC: 左侧：主要导航菜单 -->
				<ul class="navbar-nav mr-auto">
				
					<!--{hook header_nav_2_pc_forum_before.htm}-->
					<li class="nav-item home" data-active="index"><a class="nav-link" href="."><?php echo lang('index_page');?></a></li>
					<!--{hook header_nav_2_pc_forum_after.htm}-->
					
					<!--{hook header_nav_2_pc_bbs_before.htm}-->
					<?php if($conf['nav_2_bbs_on']) { ?>
					<li class="nav-item bbs" data-active="bbs"><a class="nav-link" href="<?php echo url('bbs');?>"><?php echo lang('bbs');?></a></li>
					<?php } ?>
					<!--{hook header_nav_2_pc_bbs_after.htm}-->
					
				</ul>
				
				<!-- PC: 右侧：用户 -->
				<ul class="navbar-nav">
					<!--{hook header_nav_2_pc_user_start.htm}-->
					
				<?php if(empty($uid)) { ?>
					<!--{hook header_nav_2_pc_user_login_before.htm}-->
					<li class="nav-item"><a class="nav-link" href="<?php echo url('user-login');?>"><i class="icon-user"></i> <?php echo lang('login');?></a></li>
					<!--{hook header_nav_2_pc_user_login_after.htm}-->
				<?php } else { ?>
					<!--{hook header_nav_2_pc_user_name_before.htm}-->
					<li class="nav-item username"><a class="nav-link" href="<?php echo url('my');?>"><img class="avatar-1" src="<?php echo $user['avatar_url'];?>"> <?php echo $user['username'];?></a></li>
					<!--{hook header_nav_2_pc_user_name_before.htm}-->
					
					<!-- 管理员 -->
					<?php if($gid == 1) { ?>
					<li class="nav-item"><a class="nav-link" href="admin/"><i class="icon-home"></i> <?php echo lang('admin_page');?></a></li>
					<?php } ?>
					<!--{hook header_nav_2_pc_admin_page_after.htm}-->
					
					<!--{hook header_nav_2_pc_user_logout_before.htm}-->
					<li class="nav-item"><a class="nav-link" href="<?php echo url('user-logout');?>"><i class="icon-sign-out"></i> <?php echo lang('logout');?></a></li>
					<!--{hook header_nav_2_pc_user_logout_after.htm}-->
				<?php } ?>
				
					<!--{hook header_nav_2_user_pc_end.htm}-->
				</ul>
				
			</div>
		</div>
		
		<!-- pc 的版块列表 -->
		<!-- 版块放在第二级别显示 -->
		<?php if(!empty($conf['nav_2_forum_list_pc_on']) && in_array($route, array('bbs', 'forum', 'thread', 'post')) || (!$conf['nav_2_bbs_on'] && $route == 'index')) { ?>
		<div class="hidden-sm hidden-md" id="nav_pc_2">
			<div class="container">
				<ul class="nav">
					<!--{hook header_nav_2_pc_forum_start.htm}-->
					<?php foreach($forumlist_show as $_forum) { ?>
					<!--{hook header_nav_2_pc_forumlist_loop_start.htm}-->
					<li class="nav-item" fid="<?php echo $_forum['fid'];?>" data-active="fid-<?php echo $_forum['fid'];?>">
						<a class="nav-link" href="<?php echo url("forum-$_forum[fid]");?>"><?php echo $_forum['name'];?></a>
					</li>
					<!--{hook header_nav_2_pc_forumlist_loop_end.htm}-->
					<?php } ?>
					<!--{hook header_nav_2_pc_forum_end.htm}-->
				</ul>
			</div>
		</div>
		<?php } ?>
		<!-- PC Navigation end -->
		
		
		
		
		<!-- Mobile Navigation start -->
		<div  class="navbar navbar-dark bg-dark navbar-expand-lg  hidden-lg">
			<div class="container" id="mobile_nav">
			
				<!-- 左侧：菜单按钮 -->
				<!--{hook header_nav_2_toggler_before.htm}-->
				<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mobile_nav_dropdown" aria-controls="navbar_collapse" aria-expanded="false" aria-label="<?php echo lang('toggler_menu');?>">
					<span class="navbar-toggler-icon"></span>
				</button>
				<!--{hook header_nav_2_toggler_after.htm}-->
				
				<!-- 中间的 LOGO、网站标题 -->
				<!--{hook header_nav_2_logo_before.htm}-->
				<a class="navbar-brand text-truncate" href="<?php echo $header['mobile_link'];?>">
					<img src="<?php echo $conf['logo_mobile_url'];?>" class="logo-2">
					<?php if($header['mobile_title']) { ?>
						<span><?php echo $header['mobile_title'];?></span>
					<?php } ?>
				</a>
				<!--{hook header_nav_2_logo_after.htm}-->
				
				<!-- 右侧的用户登录、发帖图标 -->
				<!--{hook header_nav_2_user_icon_before.htm}-->
				<?php if(empty($uid)) { ?>
					<a class="navbar-brand" href="<?php echo url('user-login');?>" aria-label="<?php echo lang('login');?>"> <i class="icon-user icon"></i></a>
				<?php } else { ?>
					<a class="navbar-brand" href="<?php echo url("thread-create-$fid");?>" aria-label="<?php echo lang('thread_create');?>"><i class="icon-edit icon"></i></a>
				<?php } ?>
				<!--{hook header_nav_2_user_icon_after.htm}-->
				
				
				<!-- 左侧：菜单按钮，点击弹出的下拉菜单 -->
				<div class="collapse navbar-collapse" id="mobile_nav_dropdown">
				
					<!-- 手机: 左侧：版块 -->
					
					<!--{hook header_nav_2_channel_before.htm}-->
					<h5><?php echo lang('channel');?>：</h5>
					<nav class="nav navbar-nav channel">
						<!--{hook header_nav_2_channel_index_page_before.htm}-->
						<a class="nav-link" href="./" data-active="index"><?php echo lang('index_page');?></a>
						<!--{hook header_nav_2_channel_index_page_after.htm}-->
						
						<!--{hook header_nav_2_channel_bbs_before.htm}-->
						<?php if($conf['nav_2_bbs_on']) { ?>
						<a class="nav-link" href="<?php echo url('bbs');?>" data-active="bbs"><?php echo lang('bbs');?></a>
						<?php } ?>
						<!--{hook header_nav_2_channel_bbs_after.htm}-->
					</nav>
					<!--{hook header_nav_2_channel_after.htm}-->
					
					<!--{hook header_nav_2_forumlist_before.htm}-->
					<?php if(!empty($conf['nav_2_forum_list_mobile_on'])) { ?>
					<h5><?php echo lang('bbs');?>：</h5>
					<nav class="nav navbar-nav forumlist">
						<!--{hook header_nav_2_forumlist_loop_before.htm}-->
						<?php foreach($forumlist_show as $_forum) { ?>
							<!--{hook header_nav_2_forumlist_loop_start.htm}-->
							<a class="nav-link" href="<?php echo url("forum-$_forum[fid]");?>"><?php echo $_forum['name'];?></a>
							<!--{hook header_nav_2_forumlist_loop_end.htm}-->
						<?php } ?>
						<!--{hook header_nav_2_forumlist_loop_after.htm}-->
					</nav>
					<?php } ?>
					<!--{hook header_nav_2_forumlist_after.htm}-->
	
					<!--{hook header_nav_2_my_before.htm}-->
					<h5><?php echo lang('my');?>：</h5>
					<nav class="nav navbar-nav my">
						<!--{hook header_nav_2_my_profile_before.htm}-->
						<a class="nav-link" href="<?php echo url("my");?>"><?php echo lang('user_profile');?></a>
						<!--{hook header_nav_2_my_profile_after.htm}-->
						
						<!--{hook header_nav_2_my_thread_before.htm}-->
						<a class="nav-link" href="<?php echo url("my-thread");?>"><?php echo lang('user_thread');?></a>
						<!--{hook header_nav_2_my_thread_after.htm}-->
					</nav>
					<!--{hook header_nav_2_my_after.htm}-->
					
					<!--{hook header_nav_2_user_info_before.htm}-->
					<h5></h5>
					<nav class="nav navbar-nav user">
						<!--{hook header_nav_2_user_info_start.htm}-->
					<?php if($uid) { ?>
						<div class="col"><a class="btn btn-outline-secondary btn-block" href="<?php echo url('my');?>"><img class="avatar-1" src="<?php echo $user['avatar_url'];?>"> <?php echo $user['username'];?></a></div>
						<!--{hook header_nav_2_user_info_name_after.htm}-->
						<div class="col"><a class="btn btn-outline-secondary btn-block" href="<?php echo url('user-logout');?>"><i class="icon-sign-out"></i> <?php echo lang('logout');?></a></div>
					<?php } else { ?>
						<div class="col"><a class="btn btn-outline-secondary btn-block" href="<?php echo url('user-login');?>"><?php echo lang('login');?></a></div>
						<!--{hook header_nav_2_user_info_login_after.htm}-->
						<div class="col"><a class="btn btn-outline-secondary btn-block" href="<?php echo url('user-create');?>"><?php echo lang('register');?></a></div>
					<?php } ?>
						<!--{hook header_nav_2_user_info_end.htm}-->
					</nav>
					<!--{hook header_nav_2_user_info_after.htm}-->
				
				</div>
			</div>
		</div>
		<!-- Mobile Navigation end -->
		
		
	</header>
	
	<!--{hook header_nav_2_end.htm}-->